package it.polimi.traveldream.web;

import it.polimi.traveldream.ExcursionDTO;
import it.polimi.traveldream.GestioneExcursionLocal;

import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

@ManagedBean(name="gestioneExcursionLocal")
@RequestScoped

public class ExcursionBean {
	
	@EJB
	private GestioneExcursionLocal gestioneExcursionLocal;
	
	private ExcursionDTO current;
	
	public ExcursionBean(){
		this.current=new ExcursionDTO();
	}
	
	public String create() {
		gestioneExcursionLocal.add(current);
		return "/employee/index.xhtml?faces-redirect=true";
	}
	
	public ExcursionDTO getCurrent() {
		return current;
	}
	
	public void setCurrent(ExcursionDTO current) {
		this.current = current;
	}


}
